/****************************************
*
*	EoSC_ExplosionLight
*	
*	Explosion light component which handles the lighting effects from weapons.
*
*	I have taken this from the "Eat3D UnrealScript Masterclass Part1 DVD"
*	by James Tan, Digital Confectioners 2012
*	I highly recommend buying it, especially if you plan to make a Class based game!
*	http://eat3d.com/unrealscript_mc1
*
*	ToDo:
*
****************************************/
class EoSC_ExplosionLight extends UDKExplosionLight
	HideCategories(UDKExplosionLight, PointLightComponent, LightMass, LightComponent, ImageReflection)
	EditInlineNew;

// Expose everything in this struct to the Editor
struct SLightValues
{
	var() float StartTime;
	var() float Radius;
	var() float Brightness;
	var() color LightColor;
};

// Light properties at each time shift
var(ExplosionLight) array<SLightValues> LightTimeShifts;

/**
 * Called when the light component should initialize itself
 *
 * @network			Server and client
 */
function Initialize()
{
	local LightValues LV;
	local int i;

	// Copy the LightTimeShift array to the TimeShift array
	if (LightTimeShifts.Length > 0)
	{
		for (i = 0; i < LightTimeShifts.Length; ++i)
		{
			LV.StartTime = LightTimeShifts[i].StartTime;
			LV.Radius = LightTimeShifts[i].Radius;
			LV.Brightness = LightTimeShifts[i].Brightness;
			LV.LightColor = LightTimeShifts[i].LightColor;

			TimeShift.Additem(LV);
		}
	}
}

defaultproperties
{
}